package com.sjz.han.industry.adapters;

import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.sjz.han.industry.R;
import com.sjz.han.industry.activites.MemberDetailActivity;
import com.sjz.han.industry.activites.TeamThreeActivity;
import com.sjz.han.industry.activites.TeamTwoActivity;


/**
 *团队适配器
 */
public class MainTeamDown2Adapter extends RecyclerView.Adapter<MainTeamDown2Adapter.ViewHolder> {
    private Context context;
    public MainTeamDown2Adapter(Context context) {
        this.context=context;
    }

    @Override
    public int getItemCount() {
//        return datas == null ? 0 : datas.size();
        return 3;
    }
    @Override
    public MainTeamDown2Adapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return new MainTeamDown2Adapter.ViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_teamtwo_item, parent, false));
    }

    @Override
    public void onBindViewHolder(final MainTeamDown2Adapter.ViewHolder holder, final int position) {
//         holder.team2_rel.setOnClickListener(new View.OnClickListener() {
//             @Override
//             public void onClick(View v) {
//                 context.startActivity(new Intent(context, TeamThreeActivity.class));
//             }
//         });
//        holder.teamtwo_hyxq_tv.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                context.startActivity(new Intent(context, MemberDetailActivity.class));
//            }
//        });
    }

    static class ViewHolder extends RecyclerView.ViewHolder {
        public RelativeLayout team2_rel;
        public TextView teamtwo_hyxq_tv;
        public ViewHolder(View itemView) {
            super(itemView);
//            team2_rel=(RelativeLayout)itemView.findViewById(R.id.team2_rel);
//            teamtwo_hyxq_tv=(TextView)itemView.findViewById(R.id.teamtwo_hyxq_tv);
        }

    }
}